import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import refresh from '@dfeidao/atom-web/url/refresh';
export default async function a003(fd: IFeidaoAiBrowserComponent) {
	// todo
	const vo = get(fd, 'data-vn') as string[];// 可选值编号
	const t = get(fd, 'data-t');// 值标题

	if (t === '') {
		alert('请选中需要删除的可选值！');
	} else {
		const r = await nodejs<{ code: 0 | 1; result: string; }>('basic-data-wzz/zj-000005/s001', {
			optional_value_no: vo
		});
		if (r.code === 1) {
			alert('删除成功');
			refresh();
		} else {
			alert('删除失败');
		}
	}
}
